package org.eduapp.trains.service.option;

import java.util.List;

import org.eduapp.trains.ServiceException;
import org.eduapp.trains.model.options.ModelOptions;

/**
 * 
 * @author jeccy
 *
 */
public interface OptionService {
	
	/**
	 * get option by given id
	 * @param id
	 * @return
	 */
	ModelOptions get (String id) throws ServiceException;
	
	/**
	 * get option by given option name
	 * @param optionName
	 * @return
	 */
	List<ModelOptions> getByName (String optionName) throws ServiceException;
	
	/**
	 * save or update option by given model object
	 * @param model
	 * @return
	 */
	boolean saveOrUpdate (ModelOptions model) throws ServiceException;
	
	/**
	 * remove option by given id
	 * @param id
	 * @return
	 */
	boolean remove (String id) throws ServiceException;
	
}
